classDiagram
    class Order {
        <<abstract>>
        +Long orderId
        +String orderNo
        +Long userId
        +BigDecimal totalAmount
        +BigDecimal discountAmount
        +BigDecimal actualAmount
        +OrderStatus status
        +PaymentMethod paymentMethod
        +LocalDateTime createTime
        +LocalDateTime updateTime
        +List~OrderItem~ items
        +calculateAmount()*
        +canCancel()*
        +canRefund()*
        +addItem()
        +removeItem()
        +updateStatus()
        +pay()
    }
    
    class NormalOrder {
        -BigDecimal DISCOUNT_THRESHOLD
        -BigDecimal DISCOUNT_RATE
        +calculateAmount()
        +canCancel()
        +canRefund()
    }
    
    class GroupBuyOrder {
        +Long groupActivityId
        +Integer requiredMembers
        +Integer currentMembers
        +LocalDateTime groupExpireTime
        +calculateAmount()
        +canCancel()
        +canRefund()
        +joinGroup()
    }
    
    class SeckillOrder {
        +Long seckillActivityId
        +BigDecimal seckillPrice
        +LocalDateTime seckillStartTime
        +LocalDateTime seckillEndTime
        +calculateAmount()
        +canCancel()
        +canRefund()
        +isValidSeckillTime()
    }
    
    Order <|-- NormalOrder
    Order <|-- GroupBuyOrder
    Order <|-- SeckillOrder
